VtMenuBar


Create a MenuBar widget

Syntax

VtMenuBar object_name [options]

Description

Creates a MenuBar. Returns the widget name.

Options

-spacing integer (CS)
Sets the spacing between items in a MenuBar. Useful for creating toolbars.

-helpMenuItemList ON_VERSION | ON_CONTEXT | ON_WINDOW | ON_KEYS | INDEX | TUTORIAL | ON_HELP | (C)
Sets the default help menu in a MenuBar.

Example

The following code produces a MenuBar containing three Pulldown menus and a Help menu with a HelpOnVersion option.

set app [VtOpen "VtMenuBar Demo"]
set form [VtForm $app.form]

set menubar [VtMenuBar $form.menubar -helpMenuItemList {ON_VERSION}]
   set apples [VtPulldown $menubar.apples -label "Apples"]
   set oranges [VtPulldown $menubar.oranges -label "Oranges"]
   set kumquats [VtPulldown $menubar.kumquats -label "Kumquats"]

VtShow $app.form
VtMainLoop

This code produces the following:

See also: